#! /usr/bin/env python
# -*- coding: utf-8 -*-

index_name = '液氨'
obj_type = '储罐'
obj_type_key = 'cg'
index_type = '温度'
index_type_key = 'cgwd'
status = '启用'
status_key = 1
company_name = '福建优力特材料有限公司'
company_id = '1820379858379681793'

query_sql = '''
SELECT
	count(*) 
FROM
	hgyq_major_hazard_sources.mw_m_monitor_index 
WHERE
	is_deleted = 0 
	AND create_dept = "''' + company_id + '''" 
	AND index_name LIKE "%''' + index_name + '''%" 
	AND obj_type = "''' + obj_type_key + '''" 
	AND index_type = "''' + index_type_key + '''" 
	AND status = ''' + str(status_key) + '''
'''

reset_sql = '''
SELECT
	count(*) 
FROM
	hgyq_major_hazard_sources.mw_m_monitor_index 
WHERE
	is_deleted = 0 
	AND create_dept = "''' + company_id + '''" 
'''
